extends layout

block content
    if message
        p.errorMessage=message
    | you've reached the admin page
    div.pageContainer
        div.leftSubContainer
            h1 Registered Players
            table(border=2)
                tr
                    th username
                each username in usernames
                    tr
                        td(align='centre')=username
        div.rightSubContainer
            h1 Delete Player
            form(name="delete", action="/remove", method="post")
                table(border=2)
                    tr
                        th User
                        th Delete

                    each username in usernames
                        tr
                            td(align='centre')=username
                            if username == '"admin"'
                                td(align='centre')="not editable"


                            else
                                td
                                    input(type="checkbox", name="username[]", value=username)
                    tr
                        th
                        th
                            input(type="submit", value="delete")

        h1 Update Player


        table(border=2)
            tr
                th User
                th Change Username
            each username in usernames
                form(name="update", action="/change", method="post")
                    tr
                        td(align='centre')=username
                        td
                            if username == '"admin"'
                                input(type="text", name="newUsername", value=username, readonly)
                            else


                                input(type="text", name="newUsername", value=username)
                                input(type="hidden", name="originalUsername", value=username)
                                input(type="submit", value="Update")
